<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    <title>人马君</title>
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current bg-light-gray">
        
        <nav class="bar bar-tab punch-card-bar">
          <c:set var="monthlyCourseware" value="${persist.monthlyCourseware(user.id)}"/>
          <a class="tab-item external" href="${ctx.host}/courses/${monthlyCourseware.id}/batches/${persist.batchCourseware(monthlyCourseware.id).id}/units">
            <span class="icon icon-today"></span>
            <span class="tab-label">今日</span>
          </a>
          <a class="tab-item external" href="${ctx.host}/courses">
            <span class="icon icon-lesson"></span>
            <span class="tab-label">课程</span>
          </a>
          <a class="tab-item external active" href="javascript:void(0);">
            <span class="icon icon-profile"></span>
            <span class="tab-label">我的</span>
          </a>
        </nav>

        <div class="content">
          <div class="profile-cover">
            <div class="cover-box box-shadow">
              <img src="${user.profile.avatar}" class="user-cover" onerror="this.src='${ctx.resource}/image/error.jpg'">
              <div class="username">${user.name}</div>
              <div class="mission-header">
                <div class="punch-day"><span>${courseRound.signinDays}</span>坚持打卡/天</div>
                <div class="punch-time"><span>${courseRound.signinMinutes}</span>坚持运动/分钟</div>
              </div> 
            </div>
          </div>
          
          <div class="list-block profile-list box-shadow">
            <ul>
              <li>
                <a href="${ctx.host}/profile/achievements" class="item-link item-content">
                  <div class="item-media"><i class="icon icon-achievement"></i></div>
                  <div class="item-inner">
                    <div class="item-title">个人成就</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="${ctx.host}/profile/community" class="item-link item-content">
                  <div class="item-media"><i class="icon icon-groups"></i></div>
                  <div class="item-inner">
                    <div class="item-title">打卡社群</div>
                  </div>
                </a>
              </li>
              <li>
                <a href="${ctx.host}/profile/credit" class="item-link item-content">
                  <div class="item-media"><i class="icon icon-welfare"></i></div>
                  <div class="item-inner">
                    <div class="item-title">积分兑换</div>
                  </div>
                </a>
              </li>
              <li >
                <a href="${ctx.host}/profile/feedbacks/create" class="item-link item-content">
                  <div class="item-media"><i class="icon icon-envelope"></i></div>
                  <div class="item-inner">
                    <div class="item-title">反馈信箱</div>
                  </div>
                </a>
              </li>
            </ul>
          </div>
          
          <div class="list-block profile-list box-shadow">
            <ul>
              <li >
                <a href="http://www.fit-start.co/msite/articles.html?module=3" class="item-link item-content">
                  <div class="item-media"><i class="icon icon-feedback"></i></div>
                  <div class="item-inner">
                    <div class="item-title">逆袭心得</div>
                  </div>
                </a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
    
  </body>
</html>